package com.yywz;

import java.text.MessageFormat;
import java.util.Date;

/**
 * 
 * @author guohao
 *
 */
public class TestMessageFormat {
	public static void main(String[] args) {
		Object dataArray = new Object[]{"Tom", new Date(), new Double(0.14)};
		MessageFormat messageFormat = new MessageFormat("{0} wight {2} kg on {1} ");
		String result = messageFormat.format(dataArray);
		System.out.println(result);
	}
}
